package edu.nanyang.dao;

import edu.nanyang.domain.AdminInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface AdminInfoDao {
    @Select("select * from admin_info where admin_name=#{adminName}")
    @Results({
            @Result(column = "id",property = "id"),
            @Result(column = "admin_name",property = "adminName"),
            @Result(column = "admin_pass",property = "adminPass"),
            @Result(column = "admin_phone",property = "adminPhone")
    })
    AdminInfo getByAdminName(String adminName);

    AdminInfo getById(int id);
}
